package com.travel.controller;

import com.qianfeng.util.ResultMsg;
import com.travel.entity.TbAir;
import com.travel.service.AirService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class FontAirController {

    @Autowired
    AirService airService;


    @GetMapping("/air/findAll")
    public ResultMsg findAll(){
        return airService.findAll();
    }

    @GetMapping("/air/findOne")
    public ResultMsg findOne(Integer airId){
        return airService.findOne(airId);
    }

    @GetMapping("/air/findbytime")
    public ResultMsg findbytime(String time){
        return airService.findbytime(time);
    }

    @GetMapping("/air/findbyaddr")
    public ResultMsg findbyaddr(String saddr){
        return airService.findbyaddr(saddr);
    }

    @GetMapping("/air/findbyaddress")
    public ResultMsg findbyaddress(String saddr,String eaddr){
        return airService.findbyaddress(saddr,eaddr);
    }

    @GetMapping("/air/findbyaddbytime")
    public ResultMsg findbyaddbytime(String saddr,String eaddr,String time){
        return airService.findbyaddbytime(saddr,eaddr,time);
    }

}
